home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9131 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  912 b 

  1. Path: news.Stanford.EDU!not-for-mail
  2. From: bsingh@leland.Stanford.EDU (Balraj Singh)
  3. Newsgroups: comp.lang.c++
  4. Subject: mixed language prog question
  5. Date: 28 Feb 1996 12:55:38 -0800
  6. Organization: Stanford University, CA 94305, USA
  7. Message-ID: <4h2fga$f51@elaine15.Stanford.EDU>
  8. NNTP-Posting-Host: elaine15.stanford.edu
  9.  
  10.  
  11. I have a mixed language program with C and C++ and the main() is
  12. in C then how do I compile/link the program?  When I try to link
  13. it .. I get the following message ..
  14.  
  15. CC: error: could not find _main symbol.  You must use CC to link.  If your main
  16. is not in C++, a call to _main() is required. (740)
  17.  
  18. I am using CC to link but where to I put the call to _main() and do I need
  19. the extern "C" {void main();}; def?  Any suggestions?
  20.  
  21. Please reply via mail as I dont follow this group regularly!  Thanks.
  22.  
  23. 'raj
  24. -- 
  25. Balraj Singh, bsingh@leland.stanford.edu
  26. Stanford University, Stanford CA 94305
  27.